<?

session_start();

/**
* Check if jobId exists
* YES: Concat the passedString
* NO : Create new entry of jobId
*
*/
$key = array_search($_POST["passJobId"], $_SESSION["passedJobId"]);

if($key != false){

  $_SESSION["passedString"][$key] .= "," . $_POST["passString"];
}else{
  
  $idxJobId = sizeof($_SESSION["passedJobId"]);
  
  $_SESSION["passedJobId"][$idxJobId]  = $_POST["passJobId"];
  
  $_SESSION["passedString"][$idxJobId] = $_POST["passString"];
}

?>